﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Data;

namespace WebApplication1
{
    public partial class Add_Approve_Chief : System.Web.UI.Page
    {
        string Flag = "";
        DBS md = new DBS();

            DataSet ds = new DataSet();
        protected void Page_Load(object sender, EventArgs e)
            {
                Data md = new Data();

                DataSet ds = new DataSet();
            Flag = Request["Flag"].Trim().ToString();
            if (!IsPostBack)
            {


                ViewState["UrlReferrer"] = Request.UrlReferrer.ToString();
                ds = md.Task_Approved_List(Flag);
                this.Repeater2.DataSource = ds;
                this.Repeater2.DataBind();
            }


        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            UserInfo us = new UserInfo();
            
            us.Init(Request.Cookies["UserPhone"].Value.ToString());
            DBS md = new DBS();


            md.Add_Approve(Flag, DropDownList1.SelectedItem.ToString(),TextBox2.Text.ToString(), us.ChineseName);

            Response.Redirect((String)ViewState["UrlReferrer"]);
        }
    }
}